package com.feeyo.monitor.service.imp;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.feeyo.monitor.domain.VehicleHourlyArchiver;
import com.feeyo.monitor.mapper.VehicleHourlyArchiverMapper;
import com.feeyo.monitor.service.VehicleHourlyArchiveService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

@Service
public class VehicleHourlyArchiveServiceImp implements VehicleHourlyArchiveService {

	@Autowired
	VehicleHourlyArchiverMapper vehicleHourlyArchiverMapper;
	
	@Override
	public int insert(VehicleHourlyArchiver param) {
		return vehicleHourlyArchiverMapper.insert(param);
	}

	@Override
	public PageInfo vehicleRunning(Map param, int pageNumber, int pageSize) {
		PageHelper.startPage(pageNumber, pageSize);
		List<Map> result = vehicleHourlyArchiverMapper.vehicleRunning(param);
		PageInfo pi = new PageInfo(result);
		return pi;
	}

    @Override
    public List<Map> vehicleHighCycleStat(Map param) {
        return vehicleHourlyArchiverMapper.vehicleHighCycleStat(param);
    }

}
